<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@page import="java.sql.*" %>
<!DOCTYPE html>
<html>
<head>
    <title>连接数据库</title>
</head>
<%!ResultSet rs;//声明一个ResultSet类型的rs变量用于获取从数据库获取的的结果集和，好遍历

%>
<%
String dbName = "students";//数据库名称
String userName = "root";//数据库用户名
String userPassword = "root";//数据库密码
String url = "jdbc:mysql://localhost" + dbName + "?user" + userName + "?password" +userPassword;
Class.forName("com.mysql.jdbc.Driver");

%>
<body>

</body>
</html>